import request from '@/utils/request'

export default {

  pageMaintain(current, limit, maintainQuery) {
    return request({
      url: `/MaintainRecord/listMaintain/${current}/${limit}`,
      method: 'post',
      data: maintainQuery,
    })
  },

  removeMaintain(id) {
    return request({
      url: `/MaintainRecord/removemMintain/${id}`,
      method: 'get',

    })
  },

  findAllMaintainNeed() {
    return request({
      url: `/MaintainRecord/findAllMaintainNeed`,
      method: 'get'
    })
  },

  findCarById(selectCarId,formMainDate) {
    return request({
      url: `/MaintainRecord/findCarById/${selectCarId}/${formMainDate}`,
      method: 'get'
    })
  },

 findMil(selectCarId,mainMil) {
    return request({
      url: `/MaintainRecord/findNextMil/${selectCarId}/${mainMil}`,
      method: 'get'
    })
 },

  saveMaintain(MaintainRecord) {
    return request({
      url: `/MaintainRecord/saveMintain`,
      method: 'post',
      data: MaintainRecord
    })
  },

  maintainFindById(id) {
    return request({
      url: `/MaintainRecord/findMaintainRecordById/${id}`,
      method: 'get',
    })
  },

  updateMaintainRecord(form) {
    return request({
      url: `/MaintainRecord/updateMainRecord`,
      method: 'post',
      data: form
    })
  },

  selectCheckBoxDelete(deleteCheckBox) {
    return request({
      url: `/MaintainRecord/deleteSelectCheckBox/${deleteCheckBox}`,
      method: 'get',
      // param:deleteCheckBox,
    })
  }

}
